package basic;

public class Person {
    public String name; //name
    public char sex; //sex
    private int age; //age

    public Person(String name, char sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }
    public Person(String name){
        this.name=name;
        this.sex='M';
        this.age=18;
    }
    public Person(String name,char sex){
        this.name=name;
        this.sex=sex;
        this.age=18;
    }
    public Person(String name,int age){
        this.name=name;
        this.age=age;
        this.sex='M';
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", sex=" + sex +
                ", age=" + age +
                '}';
    }
}
